package controllers

import java.net.{URLDecoder, URLEncoder}

import dao._
import javax.inject.Inject
import org.joda.time.DateTime
import play.api.libs.json.Json
import play.api.mvc._
import tool._
import models.Tables._
import play.api.routing.JavaScriptReverseRouter
import utils.{DesEncrypter, Utils}
import utils.Utils.{Info, Sender}

import scala.concurrent.ExecutionContext.Implicits.global
import scala.concurrent.Future

/**
  * Created by yz on 2018/8/20
  */
class AppController @Inject()(cc: ControllerComponents, formTool: FormTool,
                             tool: Tool, pdfInfoDao: PdfInfoDao) extends AbstractController(cc) {


  def javascriptRoutes = Action { implicit request =>
    Ok(
      JavaScriptReverseRouter("jsRoutes")(

        controllers.routes.javascript.PredictController.predictResult,
        controllers.routes.javascript.PredictController.predict,

        controllers.routes.javascript.MissionController.deleteMissionById,
        controllers.routes.javascript.MissionController.getAllMission,
        controllers.routes.javascript.MissionController.deleteMissionByIds,

      )
    ).as("text/javascript")
  }


}
